﻿//-----------------------------------------------------------------------
// <copyright file="CategoryListViewEventArgs.cs" company="Forebrain Technology, LLC">
//
// Copyright (c) Forebrain Technology, LLC. All rights reserved.
// 
// This source code is released under the Microsoft Public License (Ms-PL).
//
// </copyright>
//-----------------------------------------------------------------------
namespace PivotCollectionMaker.WinFormApplication.Controls
{
    using System;
    using PivotCollectionTools.Data;

    /// <summary>
    /// Provides data for Category List View events.
    /// </summary>
    public class CategoryListViewEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CategoryListViewEventArgs"/> class.
        /// </summary>
        /// <param name="category">The category.</param>
        /// <param name="action">The action.</param>
        public CategoryListViewEventArgs(PivotTableCategory category, ListViewAction action)
        {
            this.Category = category;
            this.Action = action;
            this.Continue = true;
            this.NewName = string.Empty;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CategoryListViewEventArgs"/> class.
        /// </summary>
        /// <param name="category">The category.</param>
        /// <param name="action">The action.</param>
        /// <param name="newName">The new name.</param>
        public CategoryListViewEventArgs(PivotTableCategory category, ListViewAction action, string newName)
            : this(category, action)
        {
            this.NewName = newName;
        }

        /// <summary>
        /// Gets the category.
        /// </summary>
        /// <value>The category of the category list view event args.</value>
        public PivotTableCategory Category { get; private set; }

        /// <summary>
        /// Gets the action.
        /// </summary>
        /// <value>The action of the category list view event args.</value>
        public ListViewAction Action { get; private set; }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="CategoryListViewEventArgs"/> is continue.
        /// </summary>
        /// <value><c>true</c> if continue; otherwise, <c>false</c>.</value>
        public bool Continue { get; set; }

        /// <summary>
        /// Gets the new name.
        /// </summary>
        /// <value>The new name of the category list view event args.</value>
        public string NewName { get; private set; }
    }
}
